/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.designpatterns.creational.builder;

import java.util.Date;

/**
 *
 * @author BassonCJ
 */
public class BuilderFactory {
    private static BuilderFactory builder = null;
    
    private BuilderFactory(){        
    }
    
    public synchronized static BuilderFactory getInstance(){
        if(builder == null){
            builder = new BuilderFactory();
        }
        return builder;
    }
    
    public Date getDate(){
        return new Date();
    }
    
    public MealBuilderFactory getMealBuilderFactory(){
        return new MealBuilderFactory();
    }
    
    public MealFactory getMealFactory(){
        return new MealFactory();
    }
    
    public MealDirectorFactory getMealDirectorFactory(){
        return new MealDirectorFactory();
    }
}
